CDGetCompressedImageSize
Your component receives theCDGetCompressedImageSize
request whenever an application calls the Image Compression Manager'sGetCompressedImageSize
function.You can use the
CDGetCompressedImageSize
function when you are extracting a single image from a sequence; therefore, you don't have an image description structure and don't know the exact size of one frame. In this case, the Image Compression Manager calls the component to determine the size of the data.
pascal ComponentResult CDGetCompressedImageSize (ImageDescriptionHandle desc, Ptr data, long bufferSize, DataProcRecordPtr dataProc, long *dataSize);
desc
- Contains a handle to the image description structure that defines the compressed image for the operation.
data
- Points to the compressed image data.
bufferSize
- Specifies the size of the buffer to be used by the data-loading
function specified by thedataProc
parameter. If the application did not specify a data-loading function this parameter isnil
.dataProc
- Points to a data-loading function structure. If the data stream is not all in memory when the application calls
GetCompressedImageSize
, your component may call an application function that loads more compressed data (see the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for more information about data-loading functions). This parameter contains a pointer to a structure that identifies the data-loading function. If the application did not provide a data-loading function, this parameter isnil
. In this case, the entire image must be in memory at the location specified by thedata
parameter.dataSize
- Contains a pointer to a field that is to receive the size, in bytes, of the compressed image.
DESCRIPTION
Your component returns a long integer indicating the number of bytes of data in the compressed image. You may want to store the image size somewhere in the image description structure, so that you can respond to this request quickly. See the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for more information about image description structures.Only decompressors receive this request.
RESULT CODES
noErr 0 No error paramErr -50 Invalid parameter specified codecSpoolErr -8966 Error loading or unloading data
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help